<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			//当前时间
			var d1 = new Date();
			
			
			
			//明年1 1
			var d2 = new Date(d1.getFullYear()+1,0,1);
			
			//时间间隔
			var span = d2.getTime() - d1.getTime();
			var spanDay =span/1000/60/60/24;
			
			document.write("间隔"+spanDay.toFixed(0)+"天")
			
			
			//练习出生多少天
			var d3 = new Date();
			
			
			
			//明年1 1
			var d4 = new Date(d3.getYear()+2002,6,24);
			
			//时间间隔
			var span = d3.getTime() - d4.getTime();
			var spanDay =span/1000/60/60/24;
			
			document.write("间隔"+spanDay+"天")
			
		</script>
	</body>
</html>
